package com.huike.clues.service.impl;


import com.huike.clues.domain.TbClue;
import com.huike.clues.domain.TbClueTrackRecord;
import com.huike.clues.mapper.TbClueMapper;
import com.huike.clues.mapper.TbClueTrackRecordMapper;
import com.huike.clues.service.ITbClueTrackRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.AccessType;
import org.springframework.stereotype.Service;

/**
 * 线索跟进记录Service业务层处理
 * @date 2022-04-22
 */
@Service
public class TbClueTrackRecordServiceImpl implements ITbClueTrackRecordService {
    @Autowired
    private TbClueMapper tbClueMapper;

    @Autowired
    private TbClueTrackRecordMapper tbClueTrackRecordMapper;

    //  新增线索跟进记录
    @Override
    public void add(TbClueTrackRecord tbClueTrackRecord, TbClue tbClue) {
        // 1.更新线索（已经完成）
        tbClueMapper.updateTbClue(tbClue);

        // 2.新增跟进记录（需要我们自己写）
        tbClueTrackRecordMapper.insert(tbClueTrackRecord);
    }
}
